package dbModel


import "time"

type Role struct {
	Id         string    `json:"id" gorm:"primary_key; column:id;type:varchar(255)"`
	Name   string    `json:"name" gorm:"column:name; type:varchar(255)" validate:"required"`
	Desc   string    `json:"desc" gorm:"column:desc;type:text"`
	DefaultRole bool    `json:"defaultRole" gorm:"column:default_role;type:tinyint(1);default:0"`
	CreateTime time.Time `json:"-" gorm:"column:create_time; autoCreateTime"`
	UpdateTime time.Time `json:"-" gorm:"column:update_time; autoUpdateTime"`
}

// 数据表
func (*Role) TableName() string {
	return "role"
}
